<!-- catalog/templates/catalog/login.html -->
{% extends "catalog/base_generic.html" %}

{% block content %}
<h1>用户登录</h1>

<form method="post" action="{% url 'user-login' %}">
  {% csrf_token %}
  <div class="form-group">
    <label for="username">用户名:</label>
    <input type="text" id="username" name="username" class="form-control" required>
  </div>
  <div class="form-group">
    <label for="password">密码:</label>
    <input type="password" id="password" name="password" class="form-control" required>
  </div>
  <button type="submit" class="btn btn-primary">登录</button>

  <!-- 新增：忘记密码按钮 -->
  <a href="{% url 'password_reset' %}" class="btn btn-warning ml-2">忘记密码</a>
</form>
{% endblock %}